package com.bluestone.config;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
/**
 * @author <a href="mailto:ming7655@gmail.com">Aaron</a>
 *
 * 
 */

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "assertor" , propOrder = {
		"filters"
	})
public class AssertorConfig extends AbstractConfig {
	@XmlAttribute
	private String name;
	
	@XmlAttribute
	private String isDefault="N";

	@XmlElementWrapper(name = "filters")
	@XmlElement(name = "filter")
	private List<FilterConfig> filters;
	
	public void putFilterConfig(FilterConfig fc){
		if(filters==null){
			filters = new ArrayList();
		}
		filters.add(fc);
	}
	public List<FilterConfig> getFilters() {
		return filters;
	}

	public void setFilters(List<FilterConfig> filters) {
		this.filters = filters;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(String isDefault) {
		this.isDefault = isDefault;
	}
}
